package LecoLi.Util.Item03;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;

import java.util.List;

/**
 * Created by Le Co on 2017/5/15.
 */

public class LineChartViewPagerAdapter extends FragmentStatePagerAdapter {

    private List<Fragment> fragments;

    public LineChartViewPagerAdapter(FragmentManager fm , List<Fragment>fragments) {
        super(fm);
        this.fragments=fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {

        return fragments.size();
    }
}
